package main

import (
	"fmt"
	"reflect"
)

type Person struct {
	Name string
	Age  uint8
}

func (p *Person) Getname() {
	fmt.Println(p.Name)
}

type Man interface {
	Getname()
}

func main() {
	var a, b int = 1, 10
	//  for condition {}
	for a < b {
		fmt.Println(a)
		a++
	}

	var p = Person{"xiaobai", 6}
	p.Getname()
	var m Man = &p
	m.Getname()
	fmt.Println(m, reflect.TypeOf(m))
	switch m.(type) {
	case *Person:
		fmt.Println("type is person")
	}

}
